PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUGetLineControl

Obtains a text layout attribute value from a line of text.

OSStatus ATSUGetLineControl (
                     ATSUTextLayout iTextLayout,
                     UniCharArrayOffset iLineStart,
                     ATSUAttributeTag iTag,
                     ByteCount iExpectedValueSize,
                     ATSUAttributeValuePtr oValue,
                     ByteCount *oActualValueSize);
iTextLayout
A reference of type ATSUTextLayout. Pass a reference points to an initialized text layout object that contains the line whose attribute value you want to obtain. You cannot pass NULL for this parameter.

iLineStart
A value of type UniCharArrayOffset. Pass the edge offset of the beginning of the line whose attribute value you want to obtain.

iTag
A value of type ATSUAttributeTag. Pass a valid tag that corresponds to the text layout attribute whose value you want to determine. See Text Layout Attribute Tag Constants for a description of Apple-defined tag values. If you pass a style run attribute or an ATSUI-reserved tag value in this parameter, ATSUGetLineControl returns the result code kATSUInvalidAttributeTagErr.

iExpectedValueSize
The maximum size of the text layout attribute value. To determine the size of an application-defined text layout attribute value, see the discussion below. If the size is less than required, ATSUGetLineControl returns the result code kATSUInvalidAttributeSizeErr.

oValue
A pointer of type ATSUAttributeValuePtr. Before calling ATSUGetLayoutControl, pass a pointer to memory you have allocated for the attribute value. On return, oValue points to the text layout attribute value. If the attribute was not previously set, ATSUGetLineControl passes back its default value in this parameter and returns the result code kATSUNotSetErr.

oActualValueSize
A pointer to a count. On return, the actual size (in bytes) of the attribute value. You should examine this parameter if you are unsure of the size of the attribute value you wish to obtain, as in the case of application-defined text layout attributes.

function result
A result code. See Result Codes.
DISCUSSION
Before calling the ATSUGetLineControl function, call the function ATSUGetAllLineControls to obtain an array of the tags and data sizes corresponding to all previously set text layout attribute values for a line of text. To determine the value of a text layout attribute identified by a particular text layout attribute tag, you should pass the corresponding tag and data size pair passed back from ATSUGetAllLineControls in one of the structures in the oAttributeInfoArray array to ATSUGetLineControl. If you wish to obtain a particular text layout attribute value for an entire text layout object, call the function ATSUGetLayoutControl.

VERSION NOTES
Available beginning with ATSUI 1.1.

© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)